package controllers

import (
	"github.com/gin-gonic/gin"
	"k8s-api/kubeclient"
	"net/http"
)

// @Summary 获取单个文章
// @Produce json
// @Param id path int true "文章ID"
// @Success 200 {object} kubeclient.KubeController "成功"
// @Failure 400 {object} string "请求错误"
// @Failure 500 {object} string "内部错误"
// @Router /allInfo [get]
func GetAllInfoHandler(c *gin.Context) {
	kubeController := &kubeclient.PodKubeController{kubeclient.K8sMap["k8s"]}
	info, _ := kubeController.GetAllInfo()
	c.JSON(http.StatusOK, gin.H{
		"info": info,
	})
}
